package com.jc.ds.model;

import java.util.Date;

/**
 * supplier_goods
 * @author 
 */
public class SupplierGoods extends BaseValueObject {
    private Long id;

    /**
     * 产品名称
     */
    private String name;

    /**
     * 品牌ID
     */
    private Long brandid;

    /**
     * 品牌中文名称
     */
    private String brandnamecn;

    /**
     * 品牌英文名称
     */
    private String brandnameen;

    /**
     * 一级分类ID
     */
    private String typeId;

    /**
     * 一级分类名称
     */
    private String typeName;

    /**
     * 三级分类ID
     */
    private Integer categoryId;

    /**
     * 三级分类名称
     */
    private String categoryName;

    /**
     * 二级分类ID
     */
    private Integer categoryParentId;

    /**
     * 二级分类名称
     */
    private String categoryParentName;

    /**
     * 产品详情格式类型 html , pic 如果是PIC则取产品详情图片，如果是HTML则取 goods_desc 字段
     */
    private String goodsDescType;

    /**
     * 这个字段 存储产品介绍详情，如果是图片不从这里取值 ，这里面只存富文本类型
     */
    private String goodsDesc;

    /**
     * 供应商系统产品ID，用文本类型为了兼容不同供应商系统
     */
    private String supplierGoodsId;

    /**
     * 供应商ID
     */
    private Integer supplierId;

    /**
     * 供应商名称
     */
    private String supplierName;

    /**
     * 同步时间
     */
    private Date createTime;

    /**
     * 最后更新时间
     */
    private Date lastUpdateTime;

    /**
     * 规格字符串JSON格式
     */
    private String specificationsString;

    /**
     * 产品自然属性类别 1 实物产品  2 虚拟产品
     */
    private Integer goodNatureType;

    /**
     * 扩展字段
     */
    private String extend1;

    /**
     * 扩展字段
     */
    private String extend2;

    /**
     * 扩展字段
     */
    private String extend3;

    /**
     * 扩展字段
     */
    private String extend4;

    /**
     * 扩展字段
     */
    private String extend5;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getBrandid() {
        return brandid;
    }

    public void setBrandid(Long brandid) {
        this.brandid = brandid;
    }

    public String getBrandnamecn() {
        return brandnamecn;
    }

    public void setBrandnamecn(String brandnamecn) {
        this.brandnamecn = brandnamecn;
    }

    public String getBrandnameen() {
        return brandnameen;
    }

    public void setBrandnameen(String brandnameen) {
        this.brandnameen = brandnameen;
    }

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public Integer getCategoryParentId() {
        return categoryParentId;
    }

    public void setCategoryParentId(Integer categoryParentId) {
        this.categoryParentId = categoryParentId;
    }

    public String getCategoryParentName() {
        return categoryParentName;
    }

    public void setCategoryParentName(String categoryParentName) {
        this.categoryParentName = categoryParentName;
    }

    public String getGoodsDescType() {
        return goodsDescType;
    }

    public void setGoodsDescType(String goodsDescType) {
        this.goodsDescType = goodsDescType;
    }

    public String getGoodsDesc() {
        return goodsDesc;
    }

    public void setGoodsDesc(String goodsDesc) {
        this.goodsDesc = goodsDesc;
    }

    public String getSupplierGoodsId() {
        return supplierGoodsId;
    }

    public void setSupplierGoodsId(String supplierGoodsId) {
        this.supplierGoodsId = supplierGoodsId;
    }

    public Integer getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Integer supplierId) {
        this.supplierId = supplierId;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public String getSpecificationsString() {
        return specificationsString;
    }

    public void setSpecificationsString(String specificationsString) {
        this.specificationsString = specificationsString;
    }

    public Integer getGoodNatureType() {
        return goodNatureType;
    }

    public void setGoodNatureType(Integer goodNatureType) {
        this.goodNatureType = goodNatureType;
    }

    public String getExtend1() {
        return extend1;
    }

    public void setExtend1(String extend1) {
        this.extend1 = extend1;
    }

    public String getExtend2() {
        return extend2;
    }

    public void setExtend2(String extend2) {
        this.extend2 = extend2;
    }

    public String getExtend3() {
        return extend3;
    }

    public void setExtend3(String extend3) {
        this.extend3 = extend3;
    }

    public String getExtend4() {
        return extend4;
    }

    public void setExtend4(String extend4) {
        this.extend4 = extend4;
    }

    public String getExtend5() {
        return extend5;
    }

    public void setExtend5(String extend5) {
        this.extend5 = extend5;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by name asc";
            }else{
                this.orderStr = this.orderStr + ",name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by name desc";
            }else{
                this.orderStr = this.orderStr + ",name desc";
            }
        }
    }

    public void orderByBrandid(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by brandId asc";
            }else{
                this.orderStr = this.orderStr + ",brandId asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by brandId desc";
            }else{
                this.orderStr = this.orderStr + ",brandId desc";
            }
        }
    }

    public void orderByBrandnamecn(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by brandNameCn asc";
            }else{
                this.orderStr = this.orderStr + ",brandNameCn asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by brandNameCn desc";
            }else{
                this.orderStr = this.orderStr + ",brandNameCn desc";
            }
        }
    }

    public void orderByBrandnameen(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by brandNameEn asc";
            }else{
                this.orderStr = this.orderStr + ",brandNameEn asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by brandNameEn desc";
            }else{
                this.orderStr = this.orderStr + ",brandNameEn desc";
            }
        }
    }

    public void orderByTypeId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by type_id asc";
            }else{
                this.orderStr = this.orderStr + ",type_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by type_id desc";
            }else{
                this.orderStr = this.orderStr + ",type_id desc";
            }
        }
    }

    public void orderByTypeName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by type_name asc";
            }else{
                this.orderStr = this.orderStr + ",type_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by type_name desc";
            }else{
                this.orderStr = this.orderStr + ",type_name desc";
            }
        }
    }

    public void orderByCategoryId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by category_id asc";
            }else{
                this.orderStr = this.orderStr + ",category_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by category_id desc";
            }else{
                this.orderStr = this.orderStr + ",category_id desc";
            }
        }
    }

    public void orderByCategoryName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by category_name asc";
            }else{
                this.orderStr = this.orderStr + ",category_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by category_name desc";
            }else{
                this.orderStr = this.orderStr + ",category_name desc";
            }
        }
    }

    public void orderByCategoryParentId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by category_parent_id asc";
            }else{
                this.orderStr = this.orderStr + ",category_parent_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by category_parent_id desc";
            }else{
                this.orderStr = this.orderStr + ",category_parent_id desc";
            }
        }
    }

    public void orderByCategoryParentName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by category_parent_name asc";
            }else{
                this.orderStr = this.orderStr + ",category_parent_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by category_parent_name desc";
            }else{
                this.orderStr = this.orderStr + ",category_parent_name desc";
            }
        }
    }

    public void orderByGoodsDescType(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by goods_desc_type asc";
            }else{
                this.orderStr = this.orderStr + ",goods_desc_type asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by goods_desc_type desc";
            }else{
                this.orderStr = this.orderStr + ",goods_desc_type desc";
            }
        }
    }

    public void orderByGoodsDesc(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by goods_desc asc";
            }else{
                this.orderStr = this.orderStr + ",goods_desc asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by goods_desc desc";
            }else{
                this.orderStr = this.orderStr + ",goods_desc desc";
            }
        }
    }

    public void orderBySupplierGoodsId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by supplier_goods_id asc";
            }else{
                this.orderStr = this.orderStr + ",supplier_goods_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by supplier_goods_id desc";
            }else{
                this.orderStr = this.orderStr + ",supplier_goods_id desc";
            }
        }
    }

    public void orderBySupplierId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by supplier_id asc";
            }else{
                this.orderStr = this.orderStr + ",supplier_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by supplier_id desc";
            }else{
                this.orderStr = this.orderStr + ",supplier_id desc";
            }
        }
    }

    public void orderBySupplierName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by supplier_name asc";
            }else{
                this.orderStr = this.orderStr + ",supplier_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by supplier_name desc";
            }else{
                this.orderStr = this.orderStr + ",supplier_name desc";
            }
        }
    }

    public void orderByCreateTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by create_time asc";
            }else{
                this.orderStr = this.orderStr + ",create_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by create_time desc";
            }else{
                this.orderStr = this.orderStr + ",create_time desc";
            }
        }
    }

    public void orderByLastUpdateTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by last_update_time asc";
            }else{
                this.orderStr = this.orderStr + ",last_update_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by last_update_time desc";
            }else{
                this.orderStr = this.orderStr + ",last_update_time desc";
            }
        }
    }

    public void orderBySpecificationsString(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by specifications_string asc";
            }else{
                this.orderStr = this.orderStr + ",specifications_string asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by specifications_string desc";
            }else{
                this.orderStr = this.orderStr + ",specifications_string desc";
            }
        }
    }

    public void orderByGoodNatureType(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by good_nature_type asc";
            }else{
                this.orderStr = this.orderStr + ",good_nature_type asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by good_nature_type desc";
            }else{
                this.orderStr = this.orderStr + ",good_nature_type desc";
            }
        }
    }

    public void orderByExtend1(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend1 asc";
            }else{
                this.orderStr = this.orderStr + ",extend1 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend1 desc";
            }else{
                this.orderStr = this.orderStr + ",extend1 desc";
            }
        }
    }

    public void orderByExtend2(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend2 asc";
            }else{
                this.orderStr = this.orderStr + ",extend2 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend2 desc";
            }else{
                this.orderStr = this.orderStr + ",extend2 desc";
            }
        }
    }

    public void orderByExtend3(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend3 asc";
            }else{
                this.orderStr = this.orderStr + ",extend3 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend3 desc";
            }else{
                this.orderStr = this.orderStr + ",extend3 desc";
            }
        }
    }

    public void orderByExtend4(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend4 asc";
            }else{
                this.orderStr = this.orderStr + ",extend4 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend4 desc";
            }else{
                this.orderStr = this.orderStr + ",extend4 desc";
            }
        }
    }

    public void orderByExtend5(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend5 asc";
            }else{
                this.orderStr = this.orderStr + ",extend5 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend5 desc";
            }else{
                this.orderStr = this.orderStr + ",extend5 desc";
            }
        }
    }
}